

{volist name="parenterm" id="data"}

<tr id="node_{$data.id}" class="parent_id_{$data.parent_id}">
    <td width="20" align="left">
        <input  name="deletec" id="deletec" type="checkbox"/>
    </td>
    <td>
        <input name="listorder[{$data.id}]" class="listorder"  type="text" data-orderid="{$data.id}"
               value="{$data.listorder}" style="width:35px;" />
    </td>
    <td style="text-align: left">{$data.id}</td>
    <td id="term_id_{$data.id}" class="{:$a = D('term')->hasChild($data.id)?'hasChild':''}">
        <?php  $countpath = D('Term')->depth($data['parent_id']); $path = (count(array_unique($countpath))); ?>
        <?php
        $str= '';
        for($i=0;$i<$path;$i++)
            {
                $str.="&nbsp;&nbsp;&nbsp;";
            }
        echo $str;
         ?>
        {:$a ? '<img src="__ADMINLTE__dist/img/colum1nx.gif" id="term_img_'.$data["id"].'" />' : '<span style="width:12px;display: inline-block;"></span>'}
        {$data.name}
    </td>
    <td>模型栏目</td>
    <td>{$modelList[$data.model_id]}</td>
    <td>&nbsp;{if condition="( $data['display_nav'] eq 1)"}<span class="fa fa-check" style="color: #00a65a"></span>{else /}<span class="fa fa-close" style="color:#dd4b39"></span>{/if}
        <!--{if condition="( $data['display_nav'] eq 1)"}-->
        <!--显示{else /}不显示-->
        <!--{/if}-->
    </td>
    <td>
        
        <a href="{:U('Term/editTerm',array('id'=>$data['id']))}" class="btn btn-primary btn-xs">修改</a>
        <a href="{:U('Term/delTerm',array('id'=>$data['id']))}" class="btn btn-success btn-xs">删除</a>
		<a href="{:U('Term/addTerm',array('model_id'=>$data['model_id'],'parent_id'=>$data['id']))}" class="btn btn-info btn-xs">添加子栏目</a>
        <!-- 新闻 -->
        {php}$find_add_term = in_array($data['id'],$result);{/php}
        {if (!$find_add_term)}
        <a href="{:U('Content/index',array('term_id'=>$data['id'],'model_id'=>$data['model_id']))}" class="btn btn-danger btn-xs">
            查看列表
        </a>
        {/if}

    </td>

</tr>

{/volist}